package org.grow.took.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.core.GrantedAuthority;

/**
 * @Author: xwg
 * @CreateDate: 2021/10/5
 */

@Data
@TableName("RoleInfo")
public class RoleInfo implements GrantedAuthority , ConfigAttribute {
    @TableId(type = IdType.AUTO)
    private Integer roleId;
    private String roleName;
    private String roleTitle;

    @Override
    public String getAuthority() {
        return roleName;
    }

    @Override
    public String getAttribute() {
        return roleName;
    }
}
